package io;

import java.io.File;

public class DFile {

    private static void getAllDir(File file) {
        File[] files = file.listFiles();
        for (File f : files) {
            if (f.isDirectory()) {
                getAllDir(f);
            } else {
                if (f.getAbsolutePath().endsWith(".log") && f.getAbsolutePath().contains("hs_")) {
                    f.delete();
                }
            }
        }
    }

    public static void main(String[] args) {
        getAllDir(new File("D:\\projects\\empty"));
    }

}
